package demo;

import demo.controller.Iface;
import demo.controller.TestController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		ApplicationContext context =  SpringApplication.run(DemoApplication.class, args);
		//代理类
		TestController bean = context.getBean(TestController.class);
		System.out.println(bean);
		//代理接口
		Iface iface = (Iface) context.getBean("testController2");
		System.out.println(iface);
	}

}
